﻿// SMIL is a community project available under the Microsoft Public License (Ms-PL)
// Code is provided as is and with no warrenty – Use at your own risk
// View the project and the latest code at http://smil.codeplex.com/

using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ServiceModel;

namespace SMIL.Client.WPXAP.SPCommunication
{       
    public class Proxy
    {
        private static ASMX.SPGeoRssSISoapClient client;

        public static string ServiceAddress { get; set; }

        public Proxy()
        {            
        }

        public static ASMX.SPGeoRssSISoapClient GetProxy 
        {            
            get
            {               
                if (client == null)
                {
                    BasicHttpBinding bind = new BasicHttpBinding();
                    EndpointAddress endpoint = new EndpointAddress(ServiceAddress);
                    bind.MaxReceivedMessageSize = 2147483647;
                    client = new ASMX.SPGeoRssSISoapClient(bind, endpoint);                 
                }

                return client;
            }
        }
    }
}
